package wc.model.component;

import wc.model.grid.*;
import wc.model.screen.*;

public abstract class Component {
	protected TileGrid<Component> relativeLocations;
	protected Bitmap texture = null;
	protected int cost;
	protected String name;
	
	public void setCost(int cost) {
		this.cost = cost;
	}
	public int getCost() {
		return cost;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	public String getName() {
		return name;
	}
	
	public Component(TileGrid<Component> relativeLocations) {
		this.relativeLocations = relativeLocations;
	}
	
	public TileGrid<Component> getRelativeLocations() {
		return relativeLocations;
	}
	
	public void setTexture(Bitmap texture) {
		this.texture = texture;
	}
	
	public Bitmap getTexture() {
		return texture;
	}
	
	//Clockwise!!!
	//Do not call after component has been placed!
	public void rotate90() {
		//TODO: rotate image(s) by 90
		relativeLocations.rotateRelativeLocations90();
	}
}
